home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / vtdevel3.lha / SourceAGA / Plasma.s < prev    next >
Text File  |  1994-06-27  |  46KB  |  2,182 lines

  1. ;plasma
  2.  
  3. rout            ;when this is off, the routine-file will be
  4.             ;assembled, on=testing
  5.             
  6. ;debug            ;when this is on, colors in the background will
  7.             ;show how much time the routine needs.
  8.  
  9. ;ntsctest        ;when this is on, the routineplayer is in ntsc-mode
  10.  
  11. ;ocs            ;off=AGA,on=OCS testing not possible on OCS !
  12.  
  13. routinemode    equ    32768+4150;32768+16383    ;the routinemode !
  14.  
  15.  
  16. ; VideoTracker AGA developer source 25-12-93
  17. ; 24-bits colors, Super-HiRes, HAM8, maximum burstmode (64 pixels aligned)
  18. ; wich makes low-resolution overscan a bit ugly.
  19. ; no "interactive" support anymore, it's only used by Kick 1.3 users.
  20.  
  21. ; the first part of the source handles the things that are necessary to
  22. ; show the picture/copper and playing of the routine.
  23. ; the part between the "***" lines is the routine-source.
  24. ; at the bottom of the file, there are the necessary incbin-files who
  25. ; are needed to test the routine.
  26. ; these are saved with "save effect" in videotracker. they are raw
  27. ; data files which can be fonts,pictures,landscapes,vectorobjects
  28. ; etcetra.
  29. ; the incbin-files are put in the "variables" table, in the routine
  30. ; player-handler
  31. ; the place where it's done can be found by searching for "!!!"
  32.  
  33.     opt    a+    ;devpac 3 optimize
  34.     opt    o+
  35.  
  36. vew_wid    equ    48
  37. vew_hgt    equ    290
  38. win_hgt    equ    117
  39. win_str    equ    $1a
  40.  
  41.         ifd    ocs
  42. pic_wid        equ    4        ;wide in bytes
  43. pic_hgt        equ    6        ;hoogte
  44. pic_dpt        equ    8        ;number planes
  45. pic_ani        equ    10        ;aantal effes (anim)
  46. pic_vew        equ    12        ;viewmode
  47. pic_cycstr    equ    14        ;cycle start (*4)
  48. pic_cycend    equ    15        ;cycle end (*4)
  49. pic_cycspd    equ    16        ;cycle speed (*4)
  50. pic_cycadd    equ    17        ;cycle add (*4)
  51. pic_palnum    equ    30        ;aantal kleuren
  52. pic_pal        equ    32        ;palette start
  53. pic_palsiz    equ    256*2        ;vaste palette size
  54. pic_raw        equ    pic_pal+pic_palsiz    ;palette start
  55.         endc
  56.         
  57.         ifnd    ocs
  58. pic_wid        equ    4        ;wide in bytes
  59. pic_hgt        equ    6        ;hoogte
  60. pic_dpt        equ    8        ;number planes
  61. pic_ani        equ    10        ;aantal effes (anim)
  62. pic_vew        equ    12        ;viewmode
  63. pic_cycstr    equ    14        ;cycle start (*8)
  64. pic_cycend    equ    15        ;cycle end (*8)
  65. pic_cycspd    equ    16        ;cycle speed (*8)
  66. pic_cycadd    equ    17        ;cycle add (*8)
  67. pic_widmod    equ    46        ;animation-width modulo
  68. pic_future    equ    50        ;free future space
  69. pic_palnum    equ    62        ;aantal kleuren
  70. pic_pal        equ    64        ;palette start
  71. pic_palsiz    equ    256*4        ;vaste palette size (longwords)
  72. pic_raw        equ    pic_pal+pic_palsiz    ;palette start
  73.         endc
  74.         
  75. var_len        equ    $300        ;lengte vartabel
  76.  
  77. var__GfxBase    equ    $000        ;graphics lib
  78. var_pic1    equ    $004        ;current picture
  79. var_anispd1    equ    $008        ;animspeed
  80. var_anitel1    equ    $00c        ;animcount
  81. var_cprbck    equ    $010        ;copperback
  82. var_bck        equ    $014        ;background
  83. var_pic2    equ    $018        ;current picture
  84. var_ntsc    equ    $01c        ;ntsc/pal frequence
  85. var_lnd        equ    $020        ;landscape
  86. var_anilop1    equ    $024
  87. var_rottrg    equ    $028        ;effect trigger
  88. var_txt1    equ    $040        ;text
  89. var_txt16    equ    15*4+var_txt1
  90. var_vec1    equ    $080        ;vectors
  91. var_vec16    equ    15*4+var_vec1
  92. var_fon1    equ    $0c0        ;fonts
  93. var_fon16    equ    15*4+var_fon1
  94. var_cols1    equ    $100        ;colorsets
  95. var_cols16    equ    15*4+var_cols1
  96. var_obj1    equ    $180        ;objects
  97. var_obj16    equ    15*4+var_obj1
  98.  
  99.     ifd    rout
  100.     ;videotracker routine-test
  101.  
  102.     incdir    "w:include/"
  103.     include    "exec/types.i"
  104.     include    "graphics/gfxbase.i"
  105.     include    "lvo/graphics_lib.i"
  106.     incdir    'videotracker:effect/'
  107.  
  108.     SECTION    1,CODE_C
  109. tus
  110.     lea    var,a0
  111.  
  112. ;    move.l    #rotincobj,var_obj1(a0)    ;incbinfile !!!
  113. ;    move.l    #rotincbck,var_bck(a0)    ;incbinfile !!!
  114. ;    move.l    #rottube,var_vec1(a0)    ;incbinfile !!!
  115. ;    move.l    #rotsrc,curpic1        ;picture !!!
  116. ;    move.l    #rotsrc,curpal1        ;palette !!!
  117. ;    move.l    #rotset,var_cols1(a0)    ;colorset !!!
  118.  
  119.     bsr    paltabres
  120.  
  121.     move.l    ($4).w,a6
  122.     sub.l    a1,a1
  123.     jsr    -$126(a6)        ;findtask
  124.     move.l    d0,curtsk
  125.     move.l    d0,a0
  126.     move.l    $b8(a0),tskpri
  127.  
  128.     lea    dosnam,a1        ;doslib openen
  129.     moveq.l    #0,d0
  130.     move.l    (4).w,a6
  131.     jsr    -408(a6)        ;openlib
  132.     move.l    d0,doslib
  133.  
  134.     bsr.s    label5            ;videotracker opstarten
  135.     
  136.     move.l    curtsk,a0
  137.     move.l    tskpri,$b8(a0)
  138.     move.l    ($4).w,a6
  139.     jsr    -$84(a6)        ;forbid
  140.  
  141.     move.l    doslib,a1
  142.     move.l    (4).w,a6
  143.     jsr    -414(a6)        ;closelib
  144.  
  145.     moveq.l    #0,d0
  146.     rts
  147.     
  148. label5
  149.     move.l    (4).w,a6        ;workbench gedoe
  150.  
  151.     move.b    530(a6),ntscmode    ;50/60 hertz halen
  152.  
  153.     ifd    ntsctest
  154.     move.b    #60,ntscmode        ;60 hertz (ntsc)
  155.     endc
  156.  
  157.     cmp.b    #50,ntscmode        ;ntsc ?
  158.     beq.s    str.ntsc
  159.     move.l    #vew_hgt-56,hogscr    ;set NTSC screen hight
  160. str.ntsc
  161.  
  162.     lea    cprjmp,a2        ;copjmp zetten !
  163.     move.l    #cprbck-8,d0
  164.     move.w    d0,6(a2)
  165.     swap    d0
  166.     move.w    d0,2(a2)
  167.  
  168.     lea    cprbck-8,a2        ;copstr zetten !
  169.     move.l    #cpr,d0
  170.     move.w    d0,6(a2)
  171.     swap    d0
  172.     move.w    d0,2(a2)
  173.  
  174.     bsr    cprsprrem        ;sprites legen
  175.  
  176.     lea    gfxnam,a1        ;graphics lib openen
  177.     move.l    (4).w,a6
  178.     jsr    -408(a6)        ;openlib
  179.     move.l    d0,a6
  180.     move.l    d0,gfxlib
  181.     move.l    38(a6),oldcprlist
  182.  
  183.     bset    #1,$bfe001
  184.     bsr    copbuf            ;copper vullen
  185.  
  186.     bsr    sysoff
  187.  
  188. gadrun
  189.     btst    #6,($bfe001).l
  190.     bne    gadrun
  191.  
  192. scrend
  193. scrend.play
  194.     bsr    syson
  195.  
  196.     move.l    gfxlib,a1
  197.     move.l    (4).w,a6
  198.     jsr    -414(a6)        ;closelib
  199.  
  200. scrend.qb
  201.     moveq.l    #0,d0    
  202.     rts
  203.     
  204.     ;vertical blank interrupt, no blits.
  205.     ;handles counters,interlace,sprite
  206.     ;level 3
  207.  
  208. intvb
  209.     bra.s    intvb.cnt
  210.     dc.l    'VIDU'
  211.     dc.l    'LOOP'
  212. intvb.cnt
  213.     movem.l    d0-d7/a0-a6,-(sp)
  214.     lea    ($dff000).l,a6
  215.  
  216.     move.w    $01e(a6),d0
  217.     btst    #5,d0            ;vblank ?
  218.     bne.s    intvb.vb
  219.  
  220.     bra.s    intcop.end
  221.  
  222. intvb.vb
  223.     bsr    grap
  224.     bsr    palctr            ;palette zetten
  225.     bsr.s    copbuf            ;copper vullen
  226.     
  227. intvb.end
  228.     move.w    #$0020,$09c(a6)    ;vb bit wissen
  229.     movem.l    (sp)+,d0-d7/a0-a6    ;multitask uit, shit !
  230.     rte
  231.  
  232. intcop.end
  233.     movem.l    (sp)+,d0-d7/a0-a6
  234.     move.l    intvbold,-(sp)
  235.     rts
  236.  
  237.     ;transmission buffer empty routine, BLIT !
  238.     ;handles routines,animations
  239.     
  240. inttbe                    ;tbe interrupt
  241.     movem.l    d0-d7/a0-a6,-(sp)
  242.     lea    ($dff000).l,a6
  243.  
  244.     move.w    $01e(a6),d0
  245.     btst    #0,d0            ;no tbe ?
  246.     beq.s    intdskblk
  247.  
  248.  
  249.     btst    #6,($bfe001).l        ;muis ingedrukt ?
  250.     beq.s    inttbe.cop
  251.     btst    #2,($dff016).l
  252.     beq.s    inttbe.cop
  253.  
  254.     ifd    debug
  255.     move.w    #$700,$dff180
  256.     endc
  257.     
  258.     bsr    rotply            ;routineplayer BLIT !
  259.     bsr.s    copbuf            ;copper vullen
  260.  
  261.     ifd    debug
  262.     move.w    #$070,$dff180
  263.     endc
  264.     
  265. inttbe.cop
  266.  
  267. inttbe.end
  268.     move.w    #$0001,$09c(a6)
  269.     movem.l    (sp)+,d0-d7/a0-a6
  270.     rte
  271.  
  272. intdskblk
  273.     move.w    #$0001,$09c(a6)        ;be sure for no tbe handling
  274.     movem.l    (sp)+,d0-d7/a0-a6
  275.     move.l    inttbeold,-(sp)
  276.     rts
  277.  
  278.  
  279.     ;moves the copperbuffer to the copperlist
  280.     ;sort of double buffering
  281.     
  282. copbuf
  283.     movem.l    d0-d7/a0-a6,-(sp)
  284.  
  285.     lea    ($dff000).l,a6
  286.  
  287. copbuf.novb                ;copperchange overslaan
  288.     moveq.l    #0,d0
  289.     move.b    $005(a6),d0
  290.     lsl.w    #8,d0
  291.     moveq.l    #0,d1
  292.     move.b    $006(a6),d1
  293.     add.w    d1,d0
  294.  
  295.     cmp.w    #$4,d0            ;lower limit, all stations 100%
  296.     blt    copbuf.novb
  297.  
  298.     cmp.b    #50,ntscmode
  299.     beq.s    copbuf.pal
  300.     cmp.w    #$133-72-8,d0        ;ntsc grens
  301.     bge    copbuf.novb
  302.     bra.s    copbuf.cont
  303. copbuf.pal
  304.     cmp.w    #$133-8,d0        ;pal grens
  305.     bge    copbuf.novb
  306. copbuf.cont
  307.  
  308.     lea    gra.s,a0        ;buffer copieren
  309.     lea    cprbuf,a1
  310. copbuf_aga                ;AGA stuff :)
  311.     move.l    #(gra.ql)/4-1,d0
  312. copbuf.a
  313.     move.w    2(a0),2(a1)
  314.     add.l    #4,a0
  315.     add.l    #4,a1
  316.     dbra    d0,copbuf.a
  317.  
  318. copbuf.end
  319.     movem.l    (sp)+,d0-d7/a0-a6
  320.     rts
  321.  
  322.     ;goes back to the workbench
  323.     
  324. syson
  325.     movem.l    d0-d7/a0-a6,-(sp)
  326.  
  327.     move.w    #$0001,$dff09a        ;tbeint uit
  328.     move.l    intvbold,($6c).w
  329.     move.l    inttbeold,($64).w
  330.  
  331.     move.l    4,a6
  332.     jsr    -138(a6)        ;permit
  333.  
  334.     move.l    gfxlib,a6
  335.     jsr    -462(a6)        ;disownblitter
  336.  
  337.     move.l    wbview,a1
  338.     move.l    gfxlib,a6
  339.     jsr    _LVOLoadView(a6)     ; Fix view
  340.     jsr    _LVOWaitTOF(a6)
  341.     jsr    _LVOWaitTOF(a6)         ; wait for LoadView()
  342.  
  343. syson.ras
  344.     cmp.b    #$c0,$dff006        ;prevent copperjump
  345.     bne    syson.ras
  346.  
  347.     move.l    gfxlib,a6
  348.     move.l    gb_copinit(a6),$dff080     ; Kick it into life
  349.  
  350.     movem.l    (sp)+,d0-d7/a0-a6
  351.     rts
  352.     
  353.     ;goes back to the gadgetscreen
  354.     
  355. sysoff
  356.     movem.l    d0-d7/a0-a6,-(sp)
  357.      
  358.     move.l    gfxlib,a6
  359.     move.l    gb_ActiView(a6),wbview    ;current view
  360.     sub.l    a1,a1            ; clear a1
  361.     jsr     _LVOLoadView(a6)     ; Flush View to nothing
  362.     jsr    _LVOWaitTOF(a6)     ; Wait once
  363.     jsr    _LVOWaitTOF(a6)     ; Wait again.
  364.  
  365.     move.l    gfxlib,a6
  366.     jsr    -456(a6)        ;ownblitter
  367.  
  368.     move.l    4,a6
  369.     jsr    -132(a6)        ;forbid
  370.         
  371.     move.l    ($6c).w,intvbold
  372.     move.l    #intvb,($6c).w
  373.     move.l    ($64).w,inttbeold
  374.     move.l    #inttbe,($64).w
  375.     move.w    #$8001,$dff09a        ;tbeint aan
  376.     bsr    gracpr            ;reset copper
  377.     bsr    copbuf            ;copy copper
  378.     move.l    #cpr,$dff080
  379.  
  380.     movem.l    (sp)+,d0-d7/a0-a6
  381.     rts
  382.     
  383. cprsprrem
  384.     movem.l    d0-d7/a0-a6,-(sp)
  385.     lea    cprspr,a0
  386.     move.l    #sprdat,d0
  387.     move.w    #7,d1
  388. cprsprrem.a
  389.     move.w    d0,3*2(a0)
  390.     swap    d0
  391.     move.w    d0,1*2(a0)
  392.     swap    d0
  393.     add.l    #8,a0
  394.     dbra    d1,cprsprrem.a
  395.     movem.l    (sp)+,d0-d7/a0-a6
  396.     rts
  397.  
  398. varset                    ;variablen neerzetten
  399.     movem.l    d0-d7/a0-a6,-(sp)
  400.     move.l    #var,a0
  401.  
  402.     move.l    #cprbck,var_cprbck(a0)
  403.     move.l    gfxlib,var__GfxBase(a0)
  404.     move.b    ntscmode,var_ntsc(a0)
  405.  
  406.     move.l    curpic1,var_pic1(a0)    ;variabel
  407.     move.l    curpic2,var_pic2(a0)    ;variabel
  408.     move.w    anispd1,var_anispd1(a0)
  409.     move.w    anitel1,var_anitel1(a0)
  410.     move.b    anilop1,var_anilop1(a0)
  411.     move.l    #rottrg,var_rottrg(a0)
  412.     movem.l    (sp)+,d0-d7/a0-a6
  413.     rts
  414.     
  415.     ;this routine handles all videotracker-routines
  416.  
  417. rotply    
  418.     movem.l    d0-d7/a0-a6,-(sp)
  419.  
  420.     moveq.l    #0,d0
  421.  
  422.     lea    currot1,a2        ;routine 1
  423.     move.w    rotinf1,d0        ;routine info
  424.     bsr.s    rotplyr
  425.  
  426. rotply.end
  427.     movem.l    (sp)+,d0-d7/a0-a6
  428.     rts
  429.  
  430.     ;this routine handles 1 routine, BLIT !
  431.     
  432. rotplyr
  433.     movem.l    d0-d7/a1-a6,-(sp)
  434.  
  435.     move.l    #rot,(a2)        ;routinestart address
  436.  
  437. ;    move.b    #50,ntscmode        ;ntsc/pal hz
  438.     clr.l    curpic2            ;background picture
  439.     move.w    #1,anispd1        ;animationspeed
  440.     clr.w    anitel1            ;animation position
  441.  
  442.     lea    var,a0            ;communication-table
  443. ;    move.l    #rotinc,var_cols1(a0)    ;incbinfile !!!!!!!!!
  444.  
  445.     move.b    #0,anilop1        ;animloop off/on !!!
  446.     move.w    #32,anispd1        ;animdelay !!!
  447.     move.l    #routinemode,d0        ;routinemode !!!
  448.  
  449.     sub.l    a0,a0            ;picture info legen
  450.  
  451.     tst.l    (a2)            ;is er een routine ?
  452.     beq    rotplyr.end        ;interlace handling
  453.  
  454.     move.l    intdel,d2        ;delay
  455.     move.l    inttel,d1        ;teller
  456.     cmp.w    d2,d1
  457.     blt    rotplyr.end
  458.     clr.l    inttel
  459.                 
  460.     bsr    varset            ;variabelen updaten
  461.  
  462.     move.l    (a2),a1            ;routine halen
  463.     move.l    #var,a0            ;variablen tabel
  464.  
  465.     movem.l    d3-d7/a1-a6,-(sp)
  466.     moveq.l    #0,d1            ;vars wissen
  467.     moveq.l    #0,d2
  468.     moveq.l    #0,d3
  469.     moveq.l    #0,d4
  470.     moveq.l    #0,d5
  471.     moveq.l    #0,d6
  472.     moveq.l    #0,d7
  473.     sub.l    a2,a2
  474.     sub.l    a3,a3
  475.     sub.l    a4,a4
  476.     sub.l    a5,a5
  477.  
  478.     jsr    4(a1)            ;routine afwerken
  479.     movem.l    (sp)+,d3-d7/a1-a6
  480.  
  481.     ;Routine:
  482.     ;
  483.     ;Input:
  484.     ;a0=variabelentabel
  485.     ;d0=routinemode
  486.     ;
  487.     ;Output:
  488.     ;a0=picture
  489.     ;d1=copperlist
  490.     ;d2=interruptdelay        (NOT used till now)
  491.     
  492.     move.w    #$0020,$dff09a        ;vb off !
  493.  
  494.     move.l    d2,intdel        ;delay
  495.  
  496.     lea    cprjmp,a3
  497.     move.l    #cprbck-8,d0
  498.  
  499.     cmp.l    (a2),a1            ;routine ondertussen gewipt ?
  500.     bne.s    rotplyr.nocop
  501.     tst.l    d1            ;copperlist ?
  502.     beq.s    rotplyr.nocop
  503.     move.l    d1,d0
  504. rotplyr.nocop
  505.     move.w    d0,6(a3)
  506.     swap    d0
  507.     move.w    d0,2(a3)
  508.  
  509.     cmp.l    #0,a0            ;picture ?
  510.     beq.s    rotplyr.endvb
  511.  
  512.     move.l    a0,curpic1        ;current picture (cycle)
  513.     move.l    a0,curpal1        ;current palette
  514.  
  515.     tst.b    rotdpl            ;plane is geleverd
  516.     beq.s    rotplyr.set
  517.     clr.b    rotdpl
  518.     clr.l    cycdel1            ;cycle info wissen
  519.     clr.l    4+cycdel1
  520.     clr.l    curfrm1            ;curfrm1, altijd planes zetten
  521. rotplyr.set
  522.     clr.b    dplctr
  523.     bsr.s    grap
  524.     bsr    grac            ;colorset
  525. rotplyr.endvb
  526.     move.w    #$8020,$dff09a
  527. rotplyr.end
  528.     movem.l    (sp)+,d0-d7/a1-a6
  529.     rts
  530.  
  531.     ;removes possible routine-coppers
  532.     
  533. gracpr
  534.     movem.l    d0-d7/a0-a6,-(sp)
  535.     lea    cprjmp,a3
  536.     move.l    #cprbck-8,d0        ;copperlist resetten
  537.     move.w    d0,6(a3)
  538.     swap    d0
  539.     move.w    d0,2(a3)
  540.     movem.l    (sp)+,d0-d7/a0-a6
  541.     rts
  542.  
  543. grap                    ;d7=anim
  544.     movem.l    d0-d7/a0-a6,-(sp)
  545.  
  546.     clr.l    d7
  547.  
  548.     tst.l    curpic1            ;current picture ?
  549.     beq    grap.end
  550.  
  551.     move.l    curpic1,a2        ;normal pic halen
  552.  
  553.     lea    gracprscr,a1        ;window neerzetten
  554.     move.l    hogscr,d1
  555.  
  556.     move.w    pic_hgt(a2),d3        ;pic hoogte
  557.     move.w    pic_vew(a2),d5
  558.     btst    #2,d5            ;interlace ?
  559.     beq.s    grap.nohi4
  560.     lsr.w    #1,d3            ;/2
  561. grap.nohi4
  562.     cmp.w    d3,d1
  563.     bge.s    grap.hog
  564.     move.w    d1,d3
  565. grap.hog
  566.     sub.w    d3,d1
  567.     lsr.w    #1,d1
  568.     add.w    #win_str,d1
  569.     move.w    d1,d2
  570.     add.w    d3,d2
  571.  
  572.     move.b    d1,2(a1)        ;y start
  573.     move.b    d2,6(a1)        ;y end
  574.  
  575.     move.w    pic_wid(a2),d4        ;pic breedte in bytes
  576.     lsl.l    #3,d4
  577.  
  578.     move.l    #vew_wid*8,d0
  579.     move.l    #0,d1
  580.     move.l    #$61,d6
  581.  
  582.     cmp.w    #40,pic_wid(a2)        ;overscan ?
  583.     ble.s    grap.noov1
  584.     move.l    #$41,d6
  585. grap.noov1
  586.  
  587.     move.w    pic_vew(a2),d5
  588.     btst    #15,d5            ;hires ?
  589.     beq.s    grap.nohi2
  590.  
  591.     move.l    #(vew_wid)*8*2,d0
  592.     move.l    #1,d1
  593.     move.l    #$61,d6
  594.  
  595.     cmp.w    #80,pic_wid(a2)        ;overscan ?
  596.     ble.s    grap.nohi2
  597.     move.l    #(vew_wid)*8*2,d0
  598.     move.l    #$51,d6
  599.  
  600.     bra.s    grap.noshi2
  601. grap.nohi2    
  602.     btst    #6,d5            ;super hires ?
  603.     beq.s    grap.noshi2
  604.  
  605.     move.l    #(vew_wid)*8*4,d0
  606.     move.l    #2,d1
  607.     move.l    #$61,d6
  608.  
  609.     cmp.w    #80*2,pic_wid(a2)    ;overscan ?
  610.     ble.s    grap.noshi2
  611.     move.l    #(vew_wid)*8*4,d0
  612.     move.l    #$51,d6
  613.  
  614. grap.noshi2    
  615.  
  616.     clr.w    d5
  617.     cmp.w    d0,d4            ;breeder dan scherm ?
  618.     ble.s    grap.c
  619.     move.w    d4,d5
  620.     move.w    d0,d4
  621.     sub.w    d0,d5            ;modulo
  622.     lsr.w    #3,d5            ;/8
  623. grap.c
  624.     lsr.w    d1,d0
  625.     lsr.w    d1,d4
  626.  
  627.     move.w    d0,d2
  628.     sub.w    d4,d2
  629.     lsr.w    #1,d2            ;/2
  630.  
  631.     add.w    d6,d2
  632.     move.b    d2,3(a1)        ;x start
  633.     move.w    d2,d3            ;d3 bewaren !
  634.  
  635.     add.w    d4,d2            ;d4 bewaren !
  636.     move.b    d2,7(a1)        ;x end
  637.     
  638.     move.w    pic_vew(a2),d6
  639.     btst    #15,d6            ;hires ?
  640.     beq.s    grap.nohi5    
  641.     add.l    d4,d4            ;*2
  642.     bra.s    grap.noshi5
  643. grap.nohi5
  644.     btst    #6,d6            ;super hires ?
  645.     beq.s    grap.noshi5    
  646.     add.l    d4,d4            ;*4
  647.     add.l    d4,d4
  648. grap.noshi5
  649.  
  650.     move.l    d7,-(sp)
  651.     move.w    pic_vew(a2),d6
  652.     move.l    #17,d0
  653.     move.l    #4,d1            ;ecs 1
  654.     move.l    #3,d7
  655.  
  656.     btst    #15,d6            ;hires ?
  657.     beq.s    grap.nohi3    
  658.     move.l    #17,d0            ;ecs 9
  659.     move.l    #4,d1            ;ecs 2
  660.     move.l    #2,d7
  661.     bra.s    grap.noshi3
  662. grap.nohi3
  663.     btst    #6,d6            ;super hires ?
  664.     beq.s    grap.noshi3    
  665.     move.l    #17,d0            ;ecs 9
  666.     move.l    #4,d1            ;ecs 2
  667.     move.l    #1,d7
  668. grap.noshi3
  669.     sub.w    d0,d3
  670.     lsr.w    #1,d3
  671.     move.w    d3,10(a1)        ;ddfstrt
  672.     
  673.     move.w    d4,d2            ;pic breedte in pixels
  674.     lsr.w    #4,d2            ;/16
  675.     sub.w    d1,d2            ;-1
  676.  
  677.     lsl.w    d7,d2            ;*8
  678.     add.w    d2,d3
  679.     move.w    d3,14(a1)        ;ddfstop
  680.     move.l    (sp)+,d7
  681.     
  682.     lea    pic_raw(a2),a0
  683.  
  684.     moveq.l    #0,d2
  685.     move.w    pic_dpt(a2),d2
  686.     sub.l    #1,d2
  687.     muls    pic_wid(a2),d2
  688.     add.w    d2,d5
  689.  
  690.     move.w    pic_vew(a2),d2        ;viewmode add
  691.     btst    #2,d2
  692.     beq.s    grap.nolace4
  693.  
  694.     moveq.l    #0,d2
  695.     move.w    pic_dpt(a2),d2
  696.     muls    pic_wid(a2),d2
  697.     add.w    d2,d5            ;interlace gedoe
  698. grap.nolace4
  699.  
  700.     lea    gracprbpl,a4        ;iffpln neerzetten
  701.     lea    gracprpln,a0        ;iffpln neerzetten
  702.     moveq.l    #0,d2
  703.     move.w    pic_dpt(a2),d2        ;plnnummer 1 halen
  704.     move.l    #8,d6            ;copper step !
  705.  
  706.     tst.l    curpic2            ;2de picture ?
  707.     bne.s    grap.pic2
  708. grap.nopic2
  709.     move.w    d5,34(a1)        ;modulo oneven zetten
  710.     bra    grap.nodpl
  711. grap.pic2
  712.     move.l    curpic2,a3        ;oneven plane
  713.     move.l    curpic2+4,a6        ;oneven plane
  714.     move.l    currot2,a5        ;oneven plane
  715.     clr.l    curpic2            ;mischien niet goed
  716.     clr.l    curpic2+4        ;mischien niet goed
  717.     clr.l    curpal2            ;mischien niet goed
  718.     clr.l    currot2            ;mischien niet goed
  719.  
  720.     cmp.l    curpic1,a3        ;picture hetzelfde ?
  721.     beq.s    grap.nopic2
  722.     
  723.     cmp.l    #0,currot1        ;routine ?    
  724.     beq.s    grap.norot
  725.     cmp.l    currot1,a5        ;routine hetzelfde ?
  726.     beq.s    grap.nopic2
  727. grap.norot
  728.     cmp.b    #4,d2            ;> 16 kleuren ? (AGA)
  729.     bgt    grap.nopic2
  730.  
  731.     move.w    pic_dpt(a3),d3        ;plnnummer 2 halen
  732.     cmp.b    d2,d3            ;gelijke plnummers ?
  733.     bne.s    grap.nopic2
  734.     move.w    pic_vew(a2),d1
  735.     cmp.w    pic_vew(a3),d1        ;view gelijk ?
  736.     bne.s    grap.nopic2
  737.  
  738.     move.w    pic_vew(a2),d1        ;groter dan view test
  739.     btst    #6,d1            ;super hires ?
  740.     beq.s    grap.nohi2a
  741.     move.l    #vew_wid*4,d1
  742.     bra.s    grap.nohi2b
  743. grap.nohi2a
  744.     btst    #15,d1            ;hires ?
  745.     beq.s    grap.noshi2a
  746.     move.l    #vew_wid*2,d1
  747.     bra.s    grap.nohi2b
  748. grap.noshi2a
  749.     move.l    #vew_wid,d1
  750. grap.nohi2b
  751.     cmp.w    pic_wid(a2),d1        ;breder dan view ?
  752.     bgt.s    grap.small
  753.     cmp.w    pic_wid(a3),d1        ;breder dan view ?
  754.     bgt.s    grap.small
  755.  
  756.     move.w    pic_vew(a2),d1
  757.     btst    #2,d1
  758.     beq.s    grap.nolace8a
  759.     move.l    hogscr,d1
  760.     add.l    d1,d1
  761.     bra.s    grap.nolace8b
  762. grap.nolace8a
  763.     move.l    hogscr,d1
  764. grap.nolace8b
  765.     cmp.w    pic_hgt(a2),d1        ;hoger dan view ?
  766.     bgt.s    grap.small
  767.     cmp.w    pic_hgt(a3),d1        ;hoger dan view ?
  768.     bgt.s    grap.small
  769.     bra.s    grap.big
  770.  
  771. grap.small
  772.     move.w    pic_hgt(a2),d1        ;wid+hgt<vew
  773.     cmp.w    pic_hgt(a3),d1        ;hoogte gelijk ?
  774.     bne    grap.nopic2
  775.     move.w    pic_wid(a2),d1
  776.     cmp.w    pic_wid(a3),d1        ;breedte gelijk ?
  777.     bne    grap.nopic2
  778.  
  779. grap.big
  780.     move.l    a3,curpic2        ;toch wel goed !
  781.     move.l    a6,curpic2+4
  782.     move.l    a3,curpal2
  783.     move.l    a5,currot2
  784.  
  785.     tst.b    dplctr            ;dual playfield al gezet ?
  786.     beq    grap.nocop
  787.  
  788.     move.w    30(a1),34(a1)        ;modulo copieren
  789.  
  790.     move.w    2(a4),d1        ;bplcon0
  791.     btst    #10,d1            ;al dual playfield ?
  792.     beq.s    grap.ta
  793.  
  794.     move.w    2(a0),10(a0)        ;plane 0>1 copieren
  795.     move.w    6(a0),14(a0)
  796.  
  797.     move.w    18(a0),26(a0)        ;plane 2>3 copieren
  798.     move.w    22(a0),30(a0)
  799.  
  800.     move.w    34(a0),42(a0)        ;plane 4>5 copieren
  801.     move.w    38(a0),46(a0)
  802.  
  803.     move.w    50(a0),58(a0)        ;plane 6>7 copieren
  804.     move.w    54(a0),62(a0)
  805.  
  806.     bra.s    grap.tb
  807. grap.ta
  808.     move.w    24(a0),58(a0)        ;plane 3>7 copieren
  809.     move.w    28(a0),62(a0)
  810.  
  811.     move.w    18(a0),42(a0)        ;plane 2>5 copieren
  812.     move.w    22(a0),46(a0)
  813.  
  814.     move.w    10(a0),26(a0)        ;plane 1>3 copieren
  815.     move.w    14(a0),30(a0)
  816.  
  817.     move.w    2(a0),10(a0)        ;plane 0>1 copieren
  818.     move.w    6(a0),14(a0)
  819.  
  820. grap.tb
  821.     move.l    #palette,a3        ;palette copieren
  822.  
  823.     move.w    #16-1,d1
  824. grap.pal
  825.     move.l    (a3)+,60(a3)
  826.     dbra    d1,grap.pal
  827.  
  828. grap.nocop
  829.     add.w    d3,d2            ;aantal bitplanes
  830.     cmp.w    #8,d2            ;8 bitplanes ?
  831.     blt    grap.no8planes2
  832.     move.w    #%10000,d2        ;only bit 4
  833.     bra    grap.8planes2
  834. grap.no8planes2
  835.     lsl.w    #8,d2
  836.     lsl.w    #4,d2
  837. grap.8planes2
  838.     or.w    #$400,d2        ;dual playfield aan
  839.     move.w    d2,2(a4)        ;bplcon0
  840.  
  841.     movem.l    d0-d7/a0-a6,-(sp)
  842.  
  843.     move.l    curpic,a2        ;animpic ?
  844.     move.l    curfrm,d7
  845.     cmp.l    #0,a2
  846.     bne.s    grap.noanipic
  847.  
  848.     move.l    curpic2,a2        ;normal pic ?
  849.     move.l    curfrm2,d7
  850.     cmp.l    #0,a2
  851.     beq.s    grap.nodplpic
  852.  
  853. grap.noanipic
  854.     add.l    d6,a0
  855.     add.w    d6,d6
  856.     bsr.s    grappln            ;a2,d6,d7,d0
  857. grap.nodplpic
  858.     movem.l    (sp)+,d0-d7/a0-a6
  859.     add.w    d6,d6
  860.     bra.s    grap.nodpla
  861.  
  862.  
  863. grap.nodpl                ;geen dual playfield
  864.     cmp.w    #8,d2            ;8 bitplanes ?
  865.     blt    grap.no8planes
  866.     move.w    #%10000,d2        ;only bit 4
  867.     bra    grap.8planes
  868. grap.no8planes
  869.     lsl.w    #8,d2
  870.     lsl.w    #4,d2
  871. grap.8planes
  872.     move.w    d2,2(a4)        ;bplcon0
  873.  
  874. grap.nodpla
  875.     move.w    d5,30(a1)        ;modulo even
  876.  
  877.     moveq.l    #0,d3
  878.     add.w    pic_vew(a2),d3        ;viewmode add
  879.     moveq.l    #0,d2
  880.     move.w    2(a4),d2
  881.     or.l    d3,d2
  882.  
  883.     ifd    gui
  884.     tst.b    genlck
  885.     bne    grap.genset
  886.     endc
  887.  
  888.     or.l    #$100,d2        ;genlock off ($302)
  889.  
  890.     ifd    gui
  891.     bra    grap.gencont
  892. grap.genset
  893.     or.l    #$102,d2        ;genlock on ($302)
  894. grap.gencont
  895.     endc
  896.     
  897.     move.w    d2,2(a4)
  898.     
  899.     bsr.s    grappln            ;a2,d6,d7,d0
  900.  
  901. grap.end
  902.     
  903.     movem.l    (sp)+,d0-d7/a0-a6
  904.     rts
  905.         
  906.  
  907.     ;sets on of the 2 possible pictures to the copper
  908.     ;handles interlace
  909.  
  910.     ;d7=framenummer
  911.     ;d6=copperliststap
  912.     ;d0=raw planes positie
  913.     ;a2=current picture
  914. grappln                    ;planes invullen 
  915.     movem.l    d0-d7/a0-a6,-(sp)
  916.  
  917.     lea    pic_raw(a2),a1
  918.     move.l    a1,d0            ;raw planes
  919.     
  920.     moveq.l    #0,d2            ;x*y
  921.     move.w    pic_wid(a2),d2
  922.     lsr.l    #1,d2            ;/2
  923.     moveq.l    #0,d3
  924.     move.w    pic_hgt(a2),d3
  925.     muls    d3,d2
  926.     
  927.     move.l    d2,d4
  928.     add.l    d2,d2
  929.  
  930.     move.w    pic_dpt(a2),d3
  931.     muls    d3,d4            ;hele picture size
  932.     muls    d7,d4            ;frame*size d7 !!!
  933.  
  934.     add.l    d4,d4
  935.  
  936.     add.l    d4,d0
  937.  
  938.     move.l    #vew_wid,d5        ;max x view
  939.     move.l    hogscr,d4        ;max y view
  940.     move.w    pic_vew(a2),d1        ;viewmode add
  941.     btst    #2,d1
  942.     beq.s    grappln.nolace
  943.     add.l    d4,d4            ;max y view
  944. grappln.nolace
  945.     btst    #15,d1            ;hires ?
  946.     beq.s    grappln.nohi
  947.     move.l    #vew_wid*2,d5        ;max x view
  948.     bra.s    grappln.noshi
  949. grappln.nohi
  950.     btst    #6,d1            ;super hires ?
  951.     beq.s    grappln.noshi
  952.     move.l    #vew_wid*4,d5        ;max x view
  953. grappln.noshi
  954.  
  955.     moveq.l    #0,d3            ;scherm centreren
  956.     move.w    pic_wid(a2),d3        ;pic breedte in bytes
  957.     cmp.w    d5,d3            ;breder dan scherm ?
  958.     ble.s    grappln.qa
  959.     sub.w    d5,d3            ;-scherm breedte
  960.     lsr.w    #2,d3            ;/4
  961.  
  962.     add.l    d3,d3
  963.  
  964.     add.l    d3,d0
  965. grappln.qa
  966.     move.w    pic_hgt(a2),d3        ;pic hoogte in bytes
  967.     cmp.w    d4,d3            ;hoger dan scherm ?
  968.     ble.s    grappln.qb
  969.     sub.w    d4,d3            ;-scherm breedte
  970.     lsr.w    #1,d3            ;/2
  971.     moveq.l    #0,d5
  972.     move.w    pic_wid(a2),d5        ;pic breedte in bytes
  973.     muls    pic_dpt(a2),d5
  974.     muls    d5,d3
  975.     add.l    d3,d0
  976. grappln.qb
  977.     moveq.l    #0,d2
  978.     move.w    pic_wid(a2),d2
  979.  
  980.     move.w    pic_vew(a2),d5        ;interlace flipping ?
  981.     btst    #2,d5
  982.     beq.s    grappln.nolac7b
  983.  
  984.     move.w    $04(a6),d5        ;even/oneven ?
  985.     btst    #15,d5
  986.     beq.s    grappln.nolac7b
  987.     
  988.     moveq.l    #0,d3
  989.     move.w    pic_wid(a2),d3
  990.     muls    pic_dpt(a2),d3
  991.     add.l    d3,d0
  992. grappln.nolac7b
  993.  
  994.     move.w    pic_dpt(a2),d1        ;plnnummer 1 halen
  995.     tst.w    d1            ;0 planes ?
  996.     beq    grappln.end
  997.     sub.w    #1,d1
  998. grappln.a
  999.     move.w    d0,3*2(a0)
  1000.     swap    d0
  1001.     move.w    d0,1*2(a0)
  1002.     swap    d0
  1003.     add.l    d6,a0            ;d6=copper step !
  1004.     add.l    d2,d0
  1005.     dbra    d1,grappln.a
  1006.  
  1007.     cmp.w    #8,pic_dpt(a2)        ;8 planes ?
  1008.     bne    grappln.noham8
  1009.     btst    #3,pic_vew(a2)        ;ham ?
  1010.     beq    grappln.noham8
  1011.  
  1012.     move.w    -14(a0),d0        ;get 6
  1013.     move.w    -10(a0),d1
  1014.     move.w    -6(a0),d2        ;get 7
  1015.     move.w    -2(a0),d3
  1016.     move.w    -18(a0),-2(a0)        ;5>7
  1017.     move.w    -22(a0),-6(a0)        ;5>7
  1018.     move.w    -26(a0),-10(a0)        ;4>6
  1019.     move.w    -30(a0),-14(a0)        ;4>6
  1020.     move.w    -34(a0),-18(a0)        ;3>5
  1021.     move.w    -38(a0),-22(a0)        ;3>5
  1022.     move.w    -42(a0),-26(a0)        ;2>4
  1023.     move.w    -46(a0),-30(a0)        ;2>4
  1024.     move.w    -50(a0),-34(a0)        ;1>3
  1025.     move.w    -54(a0),-38(a0)        ;1>3
  1026.     move.w    -58(a0),-42(a0)        ;0>2
  1027.     move.w    -62(a0),-46(a0)        ;0>2
  1028.     move.w    d0,-62(a0)        ;6>0
  1029.     move.w    d1,-58(a0)        ;6>0
  1030.     move.w    d2,-54(a0)        ;7>1
  1031.     move.w    d3,-50(a0)        ;7>1
  1032. grappln.noham8
  1033.  
  1034. grappln.end
  1035.     movem.l    (sp)+,d0-d7/a0-a6
  1036.     rts
  1037.  
  1038.     ;sets palettes to palette-buffer
  1039.     
  1040. grac
  1041.     movem.l    d0-d7/a0-a6,-(sp)
  1042.  
  1043.     lea    curpal1,a3        ;palette 1
  1044.     move.l    #palette,a1
  1045.     bsr.s    gracfrm
  1046.  
  1047.     lea    curpal2,a3        ;palette 2 (dpl)
  1048.     move.l    #16*4+palette,a1
  1049.     bsr.s    gracfrm
  1050.     
  1051.     bsr    palctr            ;palette-buffer to copper
  1052. grac.end
  1053.     movem.l    (sp)+,d0-d7/a0-a6
  1054.     rts
  1055.         
  1056.     ;moves palette from picture to palette-buffer
  1057.  
  1058. gracfrm
  1059.     movem.l    d0-d7/a0-a6,-(sp)
  1060.     tst.l    (a3)            ;palette aanwezig ?
  1061.     beq.s    gracfrm.end
  1062.  
  1063.     move.l    (a3),a2            ;current palette
  1064.     
  1065.     cmp.l    #'PALE',(a2)        ;palette ?
  1066.     bne.s    gracfrm.pict
  1067.     lea    6(a2),a0        ;palette
  1068.     move.w    4(a2),d0        ;aantal kleuren
  1069.     bra.s    gracfrm.col
  1070. gracfrm.pict
  1071.     cmp.l    #'ANIM',(a2)        ;animatie ?
  1072.     bne.s    gracfrm.noanim
  1073.  
  1074.     moveq.l    #0,d1
  1075.     move.w    pic_ani(a2),d1
  1076.     bclr    #7,d1            ;behandelbit weghalen
  1077.  
  1078.     moveq.l    #0,d3
  1079.     move.w    pic_wid(a2),d3
  1080.     lsr.w    #1,d3            ;/2
  1081.     muls    pic_hgt(a2),d3
  1082.     muls    pic_dpt(a2),d3
  1083.  
  1084.     add.l    d3,d3
  1085.  
  1086.     add.l    #pic_raw,d3
  1087.     move.l    d3,d5
  1088.  
  1089.     btst    #0,d1
  1090.     bne.s    gracfrm.buf2
  1091.     moveq.l    #0,d5
  1092. gracfrm.buf2
  1093.     add.l    d5,a2
  1094. gracfrm.noanim
  1095.     lea    pic_pal(a2),a0        ;palette
  1096.     move.w    pic_palnum(a2),d0
  1097.  
  1098.     tst.w    d0            ;0 planes ?
  1099.     beq.s    gracfrm.end
  1100. gracfrm.col
  1101. gracfrm.fa
  1102.     move.l    (a0)+,(a1)+
  1103.     dbra    d0,gracfrm.fa
  1104. gracfrm.end
  1105.     movem.l    (sp)+,d0-d7/a0-a6
  1106.     rts
  1107.     
  1108.     ;handles colorcycling in the palette-buffer
  1109.  
  1110. palcycctr
  1111.     movem.l    d0-d7/a0-a6,-(sp)
  1112.  
  1113.     move.l    curpic1,a2        ;current raw
  1114.     cmp.l    #0,a2
  1115.     beq.s    palcycctr.qb
  1116.     lea    cycdel1,a3        ;cycle delays
  1117.     move.l    #paltab,a4
  1118.     bsr    palcyc
  1119. palcycctr.qb
  1120.     move.l    curpic2,a2        ;current raw
  1121.     cmp.l    #0,a2
  1122.     beq.s    palcycctr.c
  1123.     lea    cycdel2,a3        ;cycle delays
  1124.     move.l    #16*2+paltab,a4
  1125.     bsr    palcyc
  1126. palcycctr.c
  1127.     movem.l    (sp)+,d0-d7/a0-a6
  1128.     rts
  1129.     
  1130.     ;copies palette-buffer to copper
  1131.  
  1132. palctr
  1133.     movem.l    d0-d7/a0-a6,-(sp)
  1134.  
  1135.     lea    gracprcol,a1        ;AGA
  1136.     move.l    #palette,a0
  1137.     move.l    #paltab,a2
  1138.     move.w    #8-1,d6
  1139. palctr.e
  1140.     move.w    #32-1,d7
  1141. palctr.d
  1142.     move.w    (a2)+,d0            ;get cycle-position
  1143.     move.w    (a0,d0),6(a1)            ;high RGB bits
  1144.     move.w    2(a0,d0),((32+1)*4)+6(a1)    ;low RGB bits
  1145.     add.l    #4,a1
  1146.     dbra    d7,palctr.d
  1147.     add.l    #((32+2)*4),a1
  1148.     dbra    d6,palctr.e
  1149. palctr.end
  1150.     movem.l    (sp)+,d0-d7/a0-a6
  1151.     rts
  1152.  
  1153.     ;reset palette tabel, for proper color cycling
  1154.  
  1155. paltabres
  1156.     movem.l    d0-d7/a0-a6,-(sp)
  1157.     lea    paltab,a0
  1158.     clr.l    d0
  1159.     move.w    #256-1,d1
  1160. paltabres.a
  1161.     move.w    d0,(a0)+
  1162.     add.w    #4,d0            ;aga color words, high RGB + low RGB
  1163.     dbra    d1,paltabres.a
  1164. paltabres.end
  1165.     movem.l    (sp)+,d0-d7/a0-a6
  1166.     rts
  1167.  
  1168.     ;colorcyclinghandling of a palette
  1169.  
  1170. palcyc
  1171.     movem.l    d0-d7/a0-a6,-(sp)
  1172.     move.w    #4-1,d7            ;4 cycles
  1173. palcyc.d
  1174.     tst.w    (a3)+            ;delay klaar ?
  1175.     bne.s    palcyc.c
  1176.     
  1177.     moveq.l    #0,d1
  1178.     move.b    pic_cycstr(a2),d1    ;start color
  1179.     lsl.b    #1,d1        ;*2
  1180.  
  1181.     moveq.l    #0,d2
  1182.     move.b    pic_cycend(a2),d2    ;end color
  1183.     lsl.b    #1,d2        ;*2
  1184.  
  1185.     moveq.l    #0,d3
  1186.     move.b    pic_cycadd(a2),d3    ;richting
  1187.  
  1188.     move.l    a4,a0            ;palette pointer
  1189.     move.l    a0,a1
  1190.     add.l    d1,a0            ;startcolor
  1191.     add.l    d2,a1            ;endcolor
  1192.     
  1193.     cmp.b    #1,d3            ;omhoog
  1194.     beq.s    palcyc.up    
  1195.     cmp.b    #3,d3            ;omlaag
  1196.     beq.s    palcyc.down
  1197.     bra.s    palcyc.i
  1198.  
  1199. palcyc.up                ;kleuren copieren
  1200.     move.w    (a1),d4            ;laatst color bewaren
  1201. palcyc.f                ;kleuren copieren
  1202.     cmp.l    a0,a1
  1203.     beq.s    palcyc.fa
  1204.     move.w    -(a1),2(a1)
  1205.     bra.s    palcyc.f
  1206. palcyc.fa
  1207.     move.w    d4,(a1)
  1208.     bra.s    palcyc.g    
  1209.     
  1210. palcyc.down
  1211.     move.w    (a0),d4            ;laatst color bewaren
  1212. palcyc.h                ;kleuren copieren
  1213.     cmp.l    a0,a1
  1214.     beq.s    palcyc.ha
  1215.     move.w    2(a0),(a0)+
  1216.     bra.s    palcyc.h
  1217. palcyc.ha
  1218.     move.w    d4,(a1)
  1219.  
  1220. palcyc.g
  1221.     move.b    pic_cycspd(a2),-1(a3)    ;delay zetten
  1222.     bra.s    palcyc.i
  1223. palcyc.c
  1224.     sub.w    #1,-2(a3)        ;cycle delay aftellen
  1225. palcyc.i
  1226.     add.l    #4,a2            ;next cycle info
  1227.     dbra    d7,palcyc.d
  1228.  
  1229. palcyc.qb
  1230.     movem.l    (sp)+,d0-d7/a0-a6
  1231.     rts
  1232.  
  1233.  
  1234.  
  1235. ;    SECTION    variabelen,DATA_c
  1236.  
  1237.     cnop    0,2
  1238. curtsk        dc.l    0
  1239. tskpri        dc.l    0
  1240. duplok        dc.l    0
  1241. inttel        dc.l    0
  1242. intdel        dc.l    0
  1243.  
  1244. form        dc.l    0
  1245. ifffil        dc.l    0
  1246. intvbold    dc.l    0
  1247. inttbeold    dc.l    0
  1248. patpos        dc.l    0
  1249. gfxlib        dc.l    0
  1250. doslib        dc.l    0
  1251. wbview      dc.l    0
  1252. mt_data        dc.l    0
  1253. memvid        dc.l    0
  1254. oldcprlist    dc.l    0
  1255. hogscr        dc.l    vew_hgt
  1256.  
  1257. inspos        dc.l    -1
  1258. anispd1        dc.w    1    ;nooit op 0 !
  1259. anispd2        dc.w    1
  1260.  
  1261.         cnop    0,2
  1262. varclr.s            ;start wissen
  1263. oldrot        dc.l    0
  1264. curpic        dc.l    0
  1265. curfrm        dc.l    0
  1266. cycdel1        ds.w    4
  1267. cycdel2        ds.w    4
  1268.  
  1269. rotinf1        dc.w    0
  1270. rotinf2        dc.w    0
  1271.  
  1272. effspd        dc.w    0
  1273. efflop        dc.b    0
  1274. anilop1        dc.b    0
  1275. anilop2        dc.b    0
  1276. anipal1        dc.b    0
  1277. anipal2        dc.b    0
  1278. rotdpl        dc.b    1
  1279. rottrg        dc.b    0
  1280. dplctr        dc.b    0
  1281.         cnop    0,2
  1282.  
  1283. insdat        ds.l    4
  1284. inspri        dc.l    0
  1285. instel        dc.w    0
  1286.  
  1287. cureff        dc.l    0
  1288. efftel        dc.w    0
  1289.  
  1290. curpal1        dc.l    0
  1291. curpal2        dc.l    0
  1292. currot1        dc.l    0
  1293. currot2        dc.l    0
  1294. curpic1        dc.l    0
  1295. curpic2        dc.l    0
  1296. anitel1        dc.w    0
  1297. anitel2        dc.w    0
  1298. curfrm1        dc.l    0
  1299. curfrm2        dc.l    0
  1300. oldfrm1        dc.l    0
  1301. oldfrm2        dc.l    0
  1302.  
  1303. varclr.e
  1304.         dc.l    0            ;wisruimte
  1305.     
  1306. varclr.ql    equ    varclr.e-varclr.s    ;wislengte
  1307.     
  1308. ntscmode    dc.b    0
  1309. end        dc.b    0
  1310.  
  1311. pronam    dc.b    'VideoTracker',0
  1312.     cnop    0,2
  1313. dosnam    dc.b    'dos.library',0
  1314.     cnop    0,4
  1315. gfxnam    dc.b    'graphics.library',0
  1316.     cnop    0,4
  1317.     
  1318.     cnop    0,4
  1319. gra.s            ;copperlist edit buffer
  1320. gracprscr
  1321.     dc.w    $8e,$3381,$90,$81c1,$92,$003c,$94,$00d0
  1322. gracprbpl
  1323.     dc.w    $100,$0000,$102,$0000,$104,$0020
  1324.     dc.w    $108,$0000,$10a,$0000,$1fc,$0003
  1325. gracprpln
  1326.     dc.w    $e0,$0000,$e2,$0000    ;1
  1327.     dc.w    $e4,$0000,$e6,$0000    ;2
  1328.     dc.w    $e8,$0000,$ea,$0000    ;3
  1329.     dc.w    $ec,$0000,$ee,$0000    ;4
  1330.     dc.w    $f0,$0000,$f2,$0000    ;5
  1331.     dc.w    $f4,$0000,$f6,$0000    ;6
  1332.     dc.w    $f8,$0000,$fa,$0000    ;7
  1333.     dc.w    $fc,$0000,$fe,$0000    ;8
  1334. gracprcol
  1335.     dc.w    $106,$0000
  1336.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1337.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1338.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1339.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1340.     dc.w    $106,$0200
  1341.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1342.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1343.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1344.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1345.  
  1346.     dc.w    $106,$2000
  1347.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1348.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1349.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1350.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1351.     dc.w    $106,$2200
  1352.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1353.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1354.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1355.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1356.  
  1357.     dc.w    $106,$4000
  1358.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1359.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1360.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1361.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1362.     dc.w    $106,$4200
  1363.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1364.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1365.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1366.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1367.  
  1368.     dc.w    $106,$6000
  1369.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1370.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1371.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1372.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1373.     dc.w    $106,$6200
  1374.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1375.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1376.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1377.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1378.  
  1379.     dc.w    $106,$8000
  1380.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1381.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1382.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1383.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1384.     dc.w    $106,$8200
  1385.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1386.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1387.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1388.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1389.  
  1390.     dc.w    $106,$a000
  1391.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1392.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1393.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1394.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1395.     dc.w    $106,$a200
  1396.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1397.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1398.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1399.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1400.  
  1401.     dc.w    $106,$c000
  1402.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1403.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1404.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1405.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1406.     dc.w    $106,$c200
  1407.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1408.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1409.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1410.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1411.  
  1412.     dc.w    $106,$e000
  1413.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1414.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1415.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1416.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1417.     dc.w    $106,$e200
  1418.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1419.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1420.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1421.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1422.  
  1423.     dc.w    $106,$1000
  1424.  
  1425. cprjmp
  1426.     dc.w    $080,0,$082,0
  1427. gra.e
  1428. gra.ql    equ    gra.e-gra.s        ;block lengte
  1429.  
  1430. cpr                    ;real copperlist
  1431.     dc.w    $0001,$fffe
  1432.     dc.w    $09c,$8001        ;tbeint
  1433. cprspr
  1434.     dc.w    $120,$0000,$122,$0000
  1435.     dc.w    $124,$0000,$126,$0000
  1436.     dc.w    $128,$0000,$12a,$0000
  1437.     dc.w    $12c,$0000,$12e,$0000
  1438.     dc.w    $130,$0000,$132,$0000
  1439.     dc.w    $134,$0000,$136,$0000
  1440.     dc.w    $138,$0000,$13a,$0000
  1441.     dc.w    $13c,$0000,$13e,$0000
  1442.  
  1443. cprbuf
  1444.     dc.w    $8e,$3381,$90,$81c1,$92,$003c,$94,$00d0
  1445.     dc.w    $100,$9000,$102,$0000,$104,$0020
  1446.     dc.w    $108,$0000,$10a,$0000,$1fc,$0003
  1447.  
  1448.     dc.w    $e0,$0000,$e2,$0000    ;0
  1449.     dc.w    $e4,$0000,$e6,$0000    ;1
  1450.     dc.w    $e8,$0000,$ea,$0000    ;2
  1451.     dc.w    $ec,$0000,$ee,$0000    ;3
  1452.     dc.w    $f0,$0000,$f2,$0000    ;4
  1453.     dc.w    $f4,$0000,$f6,$0000    ;5
  1454.     dc.w    $f8,$0000,$fa,$0000    ;6
  1455.     dc.w    $fc,$0000,$fe,$0000    ;7
  1456.  
  1457.     dc.w    $106,$0000
  1458.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1459.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1460.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1461.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1462.     dc.w    $106,$0200
  1463.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1464.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1465.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1466.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1467.  
  1468.     dc.w    $106,$2000
  1469.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1470.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1471.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1472.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1473.     dc.w    $106,$2200
  1474.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1475.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1476.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1477.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1478.  
  1479.     dc.w    $106,$4000
  1480.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1481.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1482.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1483.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1484.     dc.w    $106,$4200
  1485.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1486.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1487.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1488.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1489.  
  1490.     dc.w    $106,$6000
  1491.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1492.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1493.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1494.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1495.     dc.w    $106,$6200
  1496.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1497.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1498.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1499.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1500.  
  1501.     dc.w    $106,$8000
  1502.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1503.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1504.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1505.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1506.     dc.w    $106,$8200
  1507.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1508.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1509.      dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1510.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1511.  
  1512.     dc.w    $106,$a000
  1513.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1514.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1515.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1516.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1517.     dc.w    $106,$a200
  1518.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1519.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1520.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1521.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1522.  
  1523.     dc.w    $106,$c000
  1524.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1525.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1526.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1527.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1528.     dc.w    $106,$c200
  1529.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1530.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1531.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1532.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1533.  
  1534.     dc.w    $106,$e000
  1535.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1536.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1537.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1538.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1539.     dc.w    $106,$e200
  1540.     dc.w    $180,0,$182,0,$184,0,$186,0,$188,0,$18a,0,$18c,0,$18e,0
  1541.     dc.w    $190,0,$192,0,$194,0,$196,0,$198,0,$19a,0,$19c,0,$19e,0
  1542.     dc.w    $1a0,0,$1a2,0,$1a4,0,$1a6,0,$1a8,0,$1aa,0,$1ac,0,$1ae,0
  1543.     dc.w    $1b0,0,$1b2,0,$1b4,0,$1b6,0,$1b8,0,$1ba,0,$1bc,0,$1be,0
  1544.  
  1545.     dc.w    $106,$1000
  1546.  
  1547.     dc.w    $080,0,$082,0
  1548. cprbuf.e
  1549.  
  1550.     dc.w    $088,$0000        ;copjmp2
  1551.     dc.w    $080,0,$082,0        ;moet achter cprbck blijven !
  1552. cprbck
  1553. sprdat
  1554.     dc.w    $ffff,$fffe
  1555.  
  1556. palette        ds.l    256        ;palette 24-bits, far out !
  1557. paltab        ds.w    256        ;palette cycle-tabel
  1558.  
  1559.     cnop    0,2
  1560. var    ds.b    $300    ;variabelen voor routines
  1561.  
  1562.     
  1563. ;    SECTION    10,CODE_C
  1564.         endc
  1565.  
  1566. ; this is the routine-source
  1567. ;**********************************************************************
  1568.  
  1569.  
  1570. ;bit4        ;when this is on, the 4-bit overlay-plane is used
  1571.  
  1572. ;    Input:
  1573. ;    a0=variabelen tabel
  1574. ;    d0=routinfo
  1575.  
  1576. ;    Output:
  1577. ;    a0=picture
  1578. ;    d1=copperlist
  1579.  
  1580.     SECTION    3,CODE
  1581.  
  1582.     cnop    0,8
  1583. rot
  1584. rotp
  1585.     ifd    ocs
  1586.     dc.l    'ROTO'
  1587.     endc
  1588.     ifnd    ocs
  1589.     dc.l    'ROTA'
  1590.     endc
  1591.     movem.l    d2-d7/a1-a6,-(sp)
  1592.  
  1593.     lea    ($dff000).l,a6        ;hardware
  1594.     lea    rot,a5            ;prog base
  1595.     ifd    rout
  1596.     move.l    #rotc,a2
  1597.     endc
  1598.     move.l    a2,rotchp-rot(a5)
  1599.     
  1600.     move.l    #32768,d2
  1601.     bsr    getd7
  1602.     clr.l    variabele10-rot(a5)
  1603.     clr.l    variabele11-rot(a5)
  1604.     cmp.b    #1,d7
  1605.     beq    rot.ea
  1606.     ifnd    bit4
  1607.     move.l    #4,variabele10-rot(a5)    ;raster sinus snelheid
  1608.     move.l    #16,variabele11-rot(a5)    ;raster sinus dichtheid
  1609.     endc
  1610.     ifd    bit4
  1611. ;    move.l    #4,variabele10-rot(a5)    ;raster sinus snelheid
  1612.     move.l    #64,variabele11-rot(a5)    ;raster sinus dichtheid
  1613.     endc
  1614. rot.ea    
  1615.  
  1616.     move.l    #16384,d2        ;blauw richting
  1617.     bsr    getd7
  1618.     muls    #2,d7
  1619.     btst    #2,d7
  1620.     bne    rot.dc
  1621.     move.l    #1020,d7
  1622. rot.dc
  1623.     move.l    d7,variabele6-rot(a5)
  1624.  
  1625.     move.l    #4096,d2        ;hoogte
  1626.     bsr    getd7
  1627.     muls    #1380,d7
  1628.     move.l    d7,variabele3-rot(a5)
  1629.  
  1630.     move.l    #1024,d2        ;breedte
  1631.     bsr    getd7
  1632.     muls    #6,d7
  1633.     move.l    d7,variabele9-rot(a5)
  1634.  
  1635.     move.l    #512,d2            ;groen richting
  1636.     bsr    getd7
  1637.     muls    #2,d7
  1638.     btst    #2,d7
  1639.     bne    rot.db
  1640.     move.l    #1020,d7
  1641. rot.db
  1642.     move.l    d7,variabele5-rot(a5)
  1643.  
  1644.     move.l    #128,d2            ;hoogte
  1645.     bsr    getd7
  1646.     muls    #1380,d7
  1647.     move.l    d7,variabele2-rot(a5)
  1648.  
  1649.     move.l    #32,d2            ;breedte
  1650.     bsr    getd7
  1651.     muls    #6,d7
  1652.     move.l    d7,variabele8-rot(a5)
  1653.  
  1654.     move.l    #16,d2            ;rood richting
  1655.     bsr    getd7
  1656.     muls    #2,d7
  1657.     btst    #2,d7
  1658.     bne    rot.da
  1659.     move.l    #1020,d7
  1660. rot.da
  1661.     move.l    d7,variabele4-rot(a5)
  1662.  
  1663.     move.l    #4,d2            ;hoogte
  1664.     bsr    getd7
  1665.     muls    #1380,d7
  1666.     move.l    d7,variabele1-rot(a5)
  1667.  
  1668.     move.l    #1,d2            ;breedte
  1669.     bsr    getd7
  1670.     muls    #6,d7
  1671.     move.l    d7,variabele7-rot(a5)
  1672.  
  1673. rot.end
  1674.  
  1675.     move.l    rotchp-rot(a5),a1
  1676.     tst.l    8+rot.cop1-rotc(a1)    ;initialiseren ?
  1677.     bne    rot.endb
  1678.     bsr    rot.str    
  1679. rot.endb
  1680.  
  1681.     move.l    var_cprbck(a0),d1
  1682.     sub.l    #8,d1
  1683.  
  1684.     move.l    rotchp-rot(a5),a1
  1685.     add.l    #rot.cop1-rotc,a1        ;copperjump adres zetten
  1686.     move.l    rot.buf-rot(a5),d2    ;double buffer
  1687.     eor.l    #rot.cop2-rot.cop1,d2    ;double buffer
  1688.     add.l    d2,a1            ;double buffer
  1689.  
  1690.     move.w    d1,6(a1)
  1691.     swap    d1
  1692.     move.w    d1,2(a1)
  1693.  
  1694.     move.l    a1,a2
  1695.     add.l    #rot.cprbck1ntsc,a2
  1696.     move.l    a1,a3
  1697.     add.l    #rot.cprend1ntsc,a3
  1698.     move.l    a1,a4
  1699.     add.l    #rot.cprbck1,a4
  1700.  
  1701.     cmp.b    #50,var_ntsc(a0)    ;ntsc/pal frequence
  1702.     bne    rot.ntsc
  1703.  
  1704.     move.l    #$9029fffe,(a2)        ;reset ntsc split
  1705.     move.l    #$fa29fffe,(a3)        ;reset ntsc end
  1706.     add.l    #rot.cprbck1,a1
  1707.     move.l    #$c825fffe,d0
  1708.     bra    rot.split
  1709. rot.ntsc
  1710.     move.l    #$c825fffe,(a4)        ;reset pal split
  1711.     move.l    #$00880000,(a3)        ;set ntsc end
  1712.     add.l    #rot.cprbck1ntsc,a1
  1713.     move.l    #$9029fffe,d0
  1714.  
  1715. rot.split
  1716.     move.l    #$00880000,(a1)        ;set break
  1717.     move.l    var_cprbck(a0),a2
  1718.     cmp.b    #$ff,(a2)        ;menu uit ?
  1719.     bne    rot.a
  1720.     move.l    d0,(a1)
  1721. rot.a
  1722.  
  1723.     bsr    rot.lop
  1724.  
  1725.     move.l    rotchp-rot(a5),a0
  1726.     add.l    #rot.cop1-rotc,a0
  1727.     move.l    rot.buf-rot(a5),d1
  1728.     add.l    a0,d1
  1729.  
  1730.     sub.l    a0,a0            ;geen pic
  1731.     ifd    bit4
  1732.     move.l    rotchp-rot(a5),a0
  1733.     add.l    #rotpic-rotc,a0        ;picture
  1734.     endc
  1735.     movem.l    (sp)+,d2-d7/a1-a6
  1736.     rts
  1737.  
  1738. getd7
  1739.     move.w    d0,d1
  1740.     divs    d2,d1
  1741.     and.l    #$ffff,d1        ;182
  1742.     move.l    d1,d7            ;sinuscentre (64)
  1743.     muls    d2,d1
  1744.     sub.w    d1,d0
  1745.     move.l    d0,d6            ;180
  1746.     add.l    #1,d7
  1747.     rts
  1748.  
  1749.     cnop    0,2
  1750.  
  1751. variabele12    = %111            ;RGB switch
  1752.  
  1753. rastwidth    = 50
  1754. copperlengte    = (rastwidth*4)+8
  1755.  
  1756. breedte        = (352)/8
  1757. hoogte        = 270
  1758. ystart        = $24
  1759. xstart        = $09
  1760.  
  1761. store: macro
  1762.     movem.l    d0-d7/a0-a6,-(a7)
  1763.     endm
  1764. unstore: macro
  1765.     movem.l    (a7)+,d0-d7/a0-a6
  1766.     endm
  1767.  
  1768. rot.str
  1769. j:
  1770. start:
  1771.     store
  1772.     move.l    #$dff000,a6
  1773.     bsr    inits
  1774.     unstore
  1775.     rts
  1776.  
  1777. rot.lop
  1778. loop:
  1779.     store
  1780.     move.l    #$dff000,a6
  1781.     bsr    irq
  1782.     unstore
  1783.     rts
  1784.  
  1785. irq:
  1786.     move.l    rotchp-rot(a5),a0
  1787.     add.l    #rot.cop1-rotc,a0    ;get copperlist 1
  1788.     add.l    rot.buf-rot(a5),a0
  1789.     eor.l    #rot.cop2-rot.cop1,rot.buf-rot(a5)    ;double buffer
  1790.  
  1791.     move.l    rotchp-rot(a5),a3
  1792.     add.l    #rot.cop1+8+10-rotc,a3    ;get pointer to value $180
  1793.     add.l    rot.buf-rot(a5),a3    ;double buffer
  1794.     move.l    a3,d3
  1795.  
  1796.     lea    sin,a4            ;get sinus dat
  1797.     move.l    #rastwidth-1,d7
  1798.  
  1799.     lea    mod4,a0
  1800.  
  1801.     move.l    variabele6-rot(a5),d0    ;sinus step blue
  1802.     add.l    d0,(a0)        
  1803.     cmp.l    #sinlt,(a0)
  1804.     blo.s    ok1
  1805.     sub.l    #sinlt,(a0)
  1806. ok1:
  1807.     move.l    variabele5-rot(a5),d0    ;sinus step blue
  1808.     add.l    d0,4(a0)        ;sinus step green
  1809.     cmp.l    #sinlt,4(a0)
  1810.     blo.s    ok2
  1811.     sub.l    #sinlt,4(a0)
  1812. ok2:
  1813.     move.l    variabele4-rot(a5),d0    ;sinus step blue
  1814.     add.l    d0,8(a0)        ;sinus step red
  1815.     cmp.l    #sinlt,8(a0)
  1816.     blo.s    ok3
  1817.     sub.l    #sinlt,8(a0)
  1818. ok3:
  1819.  
  1820.     move.l    (a0),d0
  1821.     move.l    4(a0),d1
  1822.     move.l    8(a0),d2
  1823.  
  1824.     move.l    variabele3-rot(a5),d4    ;blue sinus size
  1825.     move.l    variabele2-rot(a5),d5    ;green sinus size
  1826.     move.l    variabele1-rot(a5),d6    ;red sinus size
  1827.  
  1828.     move.l    d5,-(sp)
  1829.     move.l    #(($16c)/2+($16c-hoogte)),d5    ;centre color sinus
  1830.     and.l    #-2,d5
  1831.     move.l    rotchp-rot(a5),a3
  1832.     add.l    #taba-rotc,a3
  1833.     add.l    d5,a3
  1834.     move.l    (sp)+,d5
  1835.  
  1836.     clr.w    $64(a6)                ;bltamod
  1837.     clr.w    $62(a6)                ;bltbmod
  1838.     clr.w    $60(a6)                ;bltcmod
  1839.     move.w    #copperlengte-2,$66(a6)        ;bltdmod
  1840.  
  1841. rgb    equ    (variabele12&4*%10101010/%100)!(variabele12&2*%1100110)!(variabele12&1*%11110000)
  1842.  
  1843.     move.w    #%1000111100000000+rgb,$40(a6)    ;bltcon0
  1844.                         ;bitshift 
  1845.                     
  1846.     move.w    #%0100000000000000,$42(a6)    ;bltcon1
  1847.  
  1848.     move.w    #-1,$44(a6)            ;bltafwm
  1849.     move.w    #-1,$46(a6)            ;bltafwm
  1850.  
  1851. loop5:
  1852.     move.l    d7,-(sp)
  1853.     
  1854.     clr.l    d7
  1855.     cmp.l    #sinlt,d0
  1856.     blo.s    ok1a
  1857.     sub.l    #sinlt,d0
  1858. ok1a
  1859.     move    (a4,d0),d7        ;get sinus value
  1860.     muls    d4,d7
  1861.     swap    d7
  1862.     lea    (a3,d7),a0        ;get color value
  1863.  
  1864.     clr.l    d7
  1865.     cmp.l    #sinlt,d1
  1866.     blo.s    ok1b
  1867.     sub.l    #sinlt,d1
  1868. ok1b
  1869.     move    (a4,d1),d7
  1870.     muls    d5,d7
  1871.     swap    d7
  1872.     lea    $78(a3,d7),a1
  1873.  
  1874.     clr.l    d7
  1875.     cmp.l    #sinlt,d2
  1876.     blo.s    ok1c
  1877.     sub.l    #sinlt,d2
  1878. ok1c
  1879.     move    (a4,d2),d7
  1880.     muls    d6,d7
  1881.     swap    d7
  1882.     lea    -$78(a3,d7),a2
  1883.  
  1884.     move.l    (sp)+,d7
  1885.  
  1886.     move.l    a0,$50(a6)        ;bltapt
  1887.     move.l    a1,$4c(a6)        ;bltbpt
  1888.     move.l    a2,$48(a6)        ;bltcpt
  1889.     move.l    d3,$54(a6)        ;bltdpt
  1890.  
  1891.     move.w    #64*hoogte+1,$58(a6)    ;bltsize !!!!
  1892.  
  1893. bltwait.bb
  1894.     btst    #14-8,($dff002).l
  1895.     bne    bltwait.bb
  1896.  
  1897.     add.l    variabele9-rot(a5),d0    ;blue sinus step horizontal
  1898.     add.l    variabele8-rot(a5),d1    ;green sinus step horizontal
  1899.     add.l    variabele7-rot(a5),d2    ;red sinus step horizontal
  1900.     add.l    #4,d3
  1901.     dbra    d7,loop5
  1902.  
  1903.     move.l    rotchp-rot(a5),a3
  1904.     add.l    #rot.cop1+8+1-rotc,a3            ;raster-x sinus init
  1905.     add.l    rot.buf-rot(a5),a3
  1906.     lea    lrsin,a0
  1907.     move.l    mod20-rot(a5),d0
  1908.     add.l    variabele10-rot(a5),d0
  1909.     cmp.l    #sinlen,d0
  1910.     blo.s    ok4
  1911.     sub.l    #sinlen,d0
  1912. ok4:
  1913.     move.l    d0,mod20-rot(a5)
  1914.  
  1915.     move.w    #(hoogte/1)-1,d7        ;raster-x sinus
  1916. lx1:
  1917.     move.w    #1-1,d6                ;4 bit sinus
  1918. rotbit.a
  1919.     tst.b    1(a3)                ;overslaan ? (menu)
  1920.     beq    lx1a
  1921.     move.b    (a0,d0),(a3)
  1922. lx1a
  1923.     lea    copperlengte(a3),a3
  1924.     dbra    d6,rotbit.a
  1925.  
  1926.     add.l    variabele11-rot(a5),d0
  1927.     cmp.l    #sinlen,d0
  1928.     blo.s    ok4a
  1929.     sub.l    #sinlen,d0
  1930. ok4a:
  1931.     dbf    d7,lx1
  1932.  
  1933. ;    lea    rot.cop1+12+1,a3        ;102 sinus init
  1934. ;    add.l    rot.buf-rot(a5),a3
  1935. ;    lea    lrsin,a0
  1936. ;    move.l    mod20-rot(a5),d0
  1937. ;    add.l    variabele10-rot(a5),d0
  1938. ;    cmp.l    #sinlen,d0
  1939. ;    blo.s    ok4
  1940. ;    sub.l    #sinlen,d0
  1941. ;ok4:
  1942. ;    move.l    d0,mod20-rot(a5)
  1943. ;
  1944. ;    move.w    #hoogte-1,d7            ;raster-x sinus
  1945. ;lx1:
  1946. ;    tst.b    1(a3)                ;overslaan ?
  1947. ;    beq    lx1a
  1948. ;
  1949. ;    move.b    (a0,d0),(a3)
  1950. ;    add.l    variabele11-rot(a5),d0
  1951. ;    cmp.l    #sinlen,d0
  1952. ;    blo.s    ok4a
  1953. ;    sub.l    #sinlen,d0
  1954. ;ok4a:
  1955. ;lx1a
  1956. ;    lea    copperlengte(a3),a3
  1957. ;    dbf    d7,lx1
  1958.  
  1959.     rts
  1960.  
  1961. inits:
  1962.     
  1963.     move.l    #$01020000,d1        ;plane color
  1964.  
  1965.     ifd    bit4
  1966.     move.l    #$01800182,d2        ;background color
  1967.     endc
  1968.     
  1969.     ifnd    bit4
  1970.     move.l    #$01800180,d2        ;background color
  1971.     endc
  1972.     
  1973.     move.l    rotchp-rot(a5),a0
  1974.     add.l    #rot.cop1+8-rotc,a0
  1975.     move.l    #ystart,d0        ;y raster start
  1976.     clr.w    d5
  1977.  
  1978.     move.w    #hoogte-1,d4        ;fill copperlist
  1979. loop1:
  1980.     move.b    d0,(a0)+
  1981.     move.b    #xstart,(a0)+
  1982.     move.w    #$fffe,(a0)+
  1983.     move.l    d1,(a0)+
  1984.  
  1985.     move.w    #rastwidth-1,d3
  1986. loop2:    move.w    d2,(a0)+
  1987.     swap    d2
  1988.     move.w    d5,(a0)+
  1989.     dbra    d3,loop2
  1990.  
  1991.     add.l    #1,d0
  1992.     dbra    d4,loop1
  1993.  
  1994.     move.l    rotchp-rot(a5),a0
  1995.     add.l    #taba-rotc,a0
  1996.     clr.l    d0
  1997.     move.w    #($16c)/2-1,d7
  1998. loop7:
  1999.     move.w    (a0),d0
  2000.     move.w    d0,($16c)(a0)
  2001.     move.w    d0,($16c)*2(a0)
  2002.     add.l    #2,a0
  2003.     dbra    d7,loop7
  2004.  
  2005.     move    #sinlen/2-1,d7
  2006.     clr.l    d0
  2007.     lea    sin,a0
  2008.     lea    lrsin,a1
  2009. mlrt:
  2010.     move.w    (a0)+,d0
  2011.     muls    #$ff,d0        ;*256
  2012.     swap    d0        ;/65536
  2013.     add.w    #72,d0        ;+72
  2014.     move.w    d0,d1
  2015.     add.w    #$f,d1        ;+15
  2016.     lsr.w    #2,d0        ;/4
  2017.     add.w    d0,d0        ;++
  2018.     add.w    #1,d0        ;+1
  2019.     lsl.w    #8,d0        ;*256
  2020.     add.w    d1,d0
  2021.     move.w    d0,(a1)+
  2022.     dbra    d7,mlrt
  2023.  
  2024.     move.l    rotchp-rot(a5),a0
  2025.     add.l    #rot.cop1-rotc,a0    ;copy to double buffer copper
  2026.     move.l    a0,a1
  2027.     add.l    #rot.cop2-rot.cop1,a1
  2028.     move.w    #rot.cop_l/4-1,d0
  2029. ic2loop:
  2030.     move.l    (a0)+,(a1)+
  2031.     dbra    d0,ic2loop
  2032.     rts
  2033.  
  2034. rotchp        dc.l    0
  2035.  
  2036. mod4:        dc.l    0
  2037. mod5:        dc.l    0
  2038. mod6:        dc.l    0
  2039. mod20:        dc.l    0
  2040. rot.buf:    dc.l    0
  2041.  
  2042. variabele1     dc.l  0;4*1380;920    ;uitslag   rood  (sinus grote) 1840
  2043. variabele2     dc.l  0;3*1380;2*2740    ;   "      groen
  2044. variabele3     dc.l  0;2*1380;2*1840     ;   "      blauw
  2045.  
  2046. variabele4     dc.l  0;2*4        ;snelheid  rood  (sinus stap vertikaal)
  2047. variabele5     dc.l  0;1*4;2*1        ;   "      groen    ;512= 0 grens
  2048. variabele6     dc.l  0;2*4;2*3        ;   "      blauw
  2049.  
  2050. variabele7     dc.l  0;4*4        ;dichtheid rood  (sinus stap horizontaal)
  2051. variabele8     dc.l  0;3*4;2*6        ;   "      groen
  2052. variabele9     dc.l  0;2*4;2*7        ;   "      blauw
  2053.  
  2054. variabele10     dc.l 0;2        ;snelheid  y-sinus
  2055. variabele11     dc.l 0;8;26;28     ;dichtheid y-sinus
  2056.  
  2057. sin:
  2058.     incbin    "w:bin/plssin.bin"
  2059.  
  2060. sinlt        = 1024
  2061. sinlen        = 1024
  2062.  
  2063. lrsin:
  2064.     incbin    "w:bin/plslrsin.bin"
  2065. lrsin.e
  2066.  
  2067. rotp.e
  2068.  
  2069.     SECTION    4,CODE_C
  2070.  
  2071.     cnop    0,8
  2072. rotc
  2073.     ifd    ocs
  2074.     dc.l    'ROTO'
  2075.     endc
  2076.     ifnd    ocs
  2077.     dc.l    'ROTA'
  2078.     endc
  2079.     rts
  2080.     cnop    0,8
  2081.  
  2082. taba:
  2083.     incbin    'w:bin/plstab.bin'
  2084.  
  2085. ;    dc.w    $100,$100,$100,$100,$100
  2086. ;    dc.w    $200,$200,$200,$200
  2087. ;    dc.w    $300,$300,$300,$300
  2088. ;    dc.w    $400,$400,$400
  2089. ;    dc.w    $500,$500,$500
  2090. ;    dc.w    $600,$600,$600
  2091. ;    dc.w    $700,$700,$700
  2092. ;    dc.w    $800,$800,$800
  2093. ;    dc.w    $900,$900,$900
  2094. ;    dc.w    $a00,$a00,$a00
  2095. ;    dc.w    $b00,$b00,$b00
  2096. ;    dc.w    $c00,$c00,$c00
  2097. ;    dc.w    $d00,$d00
  2098. ;    dc.w    $e00,$e00
  2099. ;    dc.w    $f00,$f00,$f00
  2100. ;    dc.w    $e00,$e00
  2101. ;    dc.w    $d00,$d00
  2102. ;    dc.w    $c00,$c00,$c00
  2103. ;    dc.w    $b00,$b00,$b00
  2104. ;    dc.w    $a00,$a00,$a00
  2105. ;    dc.w    $900,$900,$900
  2106. ;    dc.w    $800,$800,$800
  2107. ;    dc.w    $700,$700,$700
  2108. ;    dc.w    $600,$600,$600
  2109. ;    dc.w    $500,$500,$500
  2110. ;    dc.w    $400,$400,$400
  2111. ;    dc.w    $300,$300,$300,$300
  2112. ;    dc.w    $200,$200,$200,$200
  2113. ;    dc.w    $100,$100,$100,$100,$100
  2114. ;    dc.w    $100,$100,$100,$100,$100
  2115. ;    dc.w    $200,$200,$200,$200
  2116. ;    dc.w    $300,$300,$300,$300
  2117. ;    dc.w    $400,$400,$400
  2118. ;    dc.w    $500,$500,$500
  2119. ;    dc.w    $600,$600,$600
  2120. ;    dc.w    $700,$700,$700
  2121. ;    dc.w    $800,$800,$800
  2122. ;    dc.w    $900,$900,$900
  2123. ;    dc.w    $a00,$a00,$a00
  2124. ;    dc.w    $b00,$b00,$b00
  2125. ;    dc.w    $c00,$c00,$c00
  2126. ;    dc.w    $d00,$d00
  2127. ;    dc.w    $e00,$e00
  2128. ;    dc.w    $f00,$f00,$f00
  2129. ;    dc.w    $e00,$e00
  2130. ;    dc.w    $d00,$d00
  2131. ;    dc.w    $c00,$c00,$c00
  2132. ;    dc.w    $b00,$b00,$b00
  2133. ;    dc.w    $a00,$a00,$a00
  2134. ;    dc.w    $900,$900,$900
  2135. ;    dc.w    $800,$800,$800
  2136. ;    dc.w    $700,$700,$700
  2137. ;    dc.w    $600,$600,$600
  2138. ;    dc.w    $500,$500,$500
  2139. ;    dc.w    $400,$400,$400
  2140. ;    dc.w    $300,$300,$300,$300
  2141. ;    dc.w    $200,$200,$200,$200
  2142. ;    dc.w    $100,$100,$100,$100,$100
  2143.  
  2144. ;    ds.b    $16c*2
  2145. taba.e
  2146.  
  2147. rot.cprbck1        equ    (copperlengte*164)+8
  2148. rot.cprbck1ntsc        equ    (copperlengte*108)+8
  2149. rot.cprend1        equ    (copperlengte*270)+8
  2150. rot.cprend1ntsc        equ    (copperlengte*214)+8
  2151.  
  2152.     ifd     bit4
  2153.     cnop    0,8
  2154. rotpic
  2155.     incbin    'w:bin/plspic.bin'
  2156.     endc
  2157.     
  2158.     cnop    0,8
  2159. rot.cop1:
  2160. rot.cop
  2161. rot.cprjmp
  2162.     dc.w    $80,0,$82,0
  2163.     dcb.b    copperlengte*164,0
  2164.     dcb.b    copperlengte*106,0
  2165.     dc.w    $88,0
  2166.     dc.l    $01800040,-2
  2167. ;    incbin    'videotracker:bin/plscop.bin'
  2168.  
  2169.     cnop    0,2
  2170. rot.cop2:
  2171.     dcb.b    rot.cop2-rot.cop1
  2172. ;    incbin    'w:bin/plscop.bin'
  2173. rot.cop2.e
  2174.  
  2175. rot.cop_l equ    rot.cop2-rot.cop1
  2176.  
  2177. rotc.e
  2178. rot.e
  2179.  
  2180. ;**********************************************************************
  2181.  
  2182.